#!/usr/bin/env python
import rospy
import roslib
from std_msgs.msg import String
from magabot.msg import Status

def callback(status):
	rospy.loginfo(status.battery)
    
def listener():
    rospy.init_node('magabot_listener', anonymous=True)
    rospy.Subscriber("magabot/status", Status, callback)
    # spin() simply keeps python from exiting until this node is stopped
    rospy.spin()
        
if __name__ == '__main__':
    listener()
